// 获取当前时间段函数
export const getTimePeriod = () => {
  const now = new Date().getHours()
  const timePeriods = [
    { period: '早上好', start: 0, end: 9 },
    { period: '上午好', start: 9, end: 14 },
    { period: '下午好', start: 14, end: 18 },
    { period: '晚上好', start: 18, end: 24 },
  ]
  const currentPeriod = timePeriods.find(
    (period) => now >= period.start && now < period.end,
  )
  return currentPeriod ? currentPeriod.period : '未知'
}
